import type { ChannelTypeEnum } from '@/core/enums/type'
import type { PlatformEnum } from '@/core/enums/platform'
import type { Order } from '@/core/interfaces/order'
import type { ServiceApproveStatusEnum, ServiceStatusEnum } from '@/core/enums/status'
import type { TypeEnum, VersionTypeEnum } from '@/core/enums/type'
import type { PriceSheet } from '@/core/interfaces/priceSheet'

export interface RawKeyword {
  clientType: PlatformEnum
  id: number
  name: string
}

export interface Keyword extends RawKeyword {
  frontKey: string
  selected: boolean
  loading: boolean
  disabled?: boolean
}

export interface OrderKeyword extends Keyword {
  orderId: Order['id']
  orderNo: Order['orderNo']
  serviceApproveStatus: ServiceApproveStatusEnum
  serviceStatus: ServiceStatusEnum
  soldAreas?: string
  type: TypeEnum
  updateUserId: number
  versionType: VersionTypeEnum
  label: string
  value: number
}

export interface PriceKeyword extends Keyword {
  channelType: ChannelTypeEnum
  cheapVersionSoldAreas?: string
  heatRate: number
  priceAskId: PriceSheet['id']
  standardVersionSoldAreas?: string
  subjectCode: number
  userCityLevel?: null
  showReasons?: string
  reasons?: string[]
  label: string
  value: number
}
